package com.lanhai.longheng.utils;
 

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.google.gson.Gson;
import com.lanhai.longheng.beans.AgvBean;
import com.lanhai.longheng.beans.AgvMountBean;
import com.lanhai.longheng.beans.DeviceMountBean;
import com.lanhai.longheng.beans.DotBean; 

public class BeanLog {

	 private static final Logger logger = LogManager.getLogger("agvlog");	
		
	
	public static void logJudgemeng(AgvBean agv ,AgvMountBean agvMount,DeviceMountBean dmount,DotBean dot) {
		Gson gson=new Gson();
		String s="";
		if(agv!=null) {
			s+="=============agv===========\r\n"+gson.toJson(agv)+"\r\n";
		}
		if(agvMount!=null) {
			s+="=============agvMount===========\r\n"+gson.toJson(agvMount)+"\r\n";
		}
		if(dmount!=null) {
			s+="=============dmount===========\r\n"+gson.toJson(dmount)+"\r\n";
		}
		if(dot!=null) {
			s+="=============dot===========\r\n"+gson.toJson(dot)+"\r\n";
		}
		logger.debug(s);
	}
}
